home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / john / hc_showd.hqx / ShowDialog XCMD 1.4 / card_8175.txt < prev    next >
Encoding:
Text File  |  1989-08-30  |  3.7 KB  |  151 lines

  1. -- card: 8175 from stack: in.4
  2. -- bmap block id: 8376
  3. -- flags: 2000
  4. -- background id: 2607
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on closeCard
  8.   lock screen
  9.   hide cd btn "OK"
  10.   hide cd pict
  11.   hide cd fld "Info"
  12.   show cd btn "Show Me"
  13.   show cd btn "Show Info"
  14.   unlock screen
  15. end closeCard
  16.  
  17.  
  18. -- part 1 (button)
  19. -- low flags: 00
  20. -- high flags: A003
  21. -- rect: left=206 top=305 right=327 bottom=306
  22. -- title width / last selected line: 0
  23. -- icon id / first selected line: 0 / 0
  24. -- text alignment: 1
  25. -- font id: 0
  26. -- text size: 12
  27. -- style flags: 0
  28. -- line height: 16
  29. -- part name: Show Me
  30. ----- HyperTalk script -----
  31. on mouseUp
  32.   lock screen
  33.   show cd pict
  34.   show cd btn "OK"
  35.   hide me
  36.   hide cd btn "Show Info"
  37.   hide cd fld "Info"
  38.   unlock screen with zoom out
  39. end mouseUp
  40.  
  41.  
  42.  
  43. -- part 2 (button)
  44. -- low flags: 80
  45. -- high flags: A003
  46. -- rect: left=418 top=268 right=290 bottom=453
  47. -- title width / last selected line: 0
  48. -- icon id / first selected line: 0 / 0
  49. -- text alignment: 1
  50. -- font id: 0
  51. -- text size: 12
  52. -- style flags: 0
  53. -- line height: 16
  54. -- part name: OK
  55. ----- HyperTalk script -----
  56. on mouseUp
  57.   lock screen
  58.   hide me
  59.   hide cd pict
  60.   show cd btn "Show Me"
  61.   show cd btn "Show Info"
  62.   unlock screen with zoom in
  63. end mouseUp
  64.  
  65.  
  66.  
  67. -- part 3 (button)
  68. -- low flags: 00
  69. -- high flags: 2000
  70. -- rect: left=444 top=238 right=260 bottom=468
  71. -- title width / last selected line: 0
  72. -- icon id / first selected line: 21676 / 21676
  73. -- text alignment: 1
  74. -- font id: 0
  75. -- text size: 12
  76. -- style flags: 0
  77. -- line height: 16
  78. -- part name: Show Info
  79. ----- HyperTalk script -----
  80. on mouseUp
  81.   lock screen
  82.   get the visible of cd fld "Info"
  83.   if it is false then
  84.     show cd fld "Info"
  85.     unlock screen with zoom out
  86.   else
  87.     hide cd fld "Info"
  88.     unlock screen with zoom in
  89.   end if
  90. end mouseUp
  91.  
  92.  
  93.  
  94. -- part 4 (field)
  95. -- low flags: 81
  96. -- high flags: 2004
  97. -- rect: left=256 top=125 right=281 bottom=490
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 0 / 0
  100. -- text alignment: 0
  101. -- font id: 3
  102. -- text size: 10
  103. -- style flags: 0
  104. -- line height: 13
  105. -- part name: Info
  106. ----- HyperTalk script -----
  107. on mouseUp
  108.   lock screen
  109.   hide me
  110.   unlock screen with zoom in
  111. end mouseUp
  112.  
  113.  
  114. -- part contents for background part 2
  115. ----- text -----
  116. Using ResEdit to Make Templates
  117.  
  118. -- part contents for background part 1
  119. ----- text -----
  120.  
  121.  
  122. Constructing DLOG/DITL templates for Type 4 of ShowDialog XCMD is only slightly more involved than for the others.
  123.  
  124. Constructing the popup menu:
  125. The popup menu consists of two DITL items, which MUST be items 5 and 6.
  126. They are: 
  127. DITL item #5: an ENABLED useritem.  This will be your popup "hot spot."
  128. DITL item #6: DISABLED static text.  This will be your popup menu title.  You cannot modify the popup menu title on the fly.  Enter in the text string in the DITL template.
  129.  
  130. These two items can be as LONG as you want, but both MUST be 17 pixels high.  This is so that the popup will be positioned correctly on top of the hot spot and the title will hilite correctly.
  131.  
  132. The popup menu title (DITL item #6) MUST be positioned TO THE LEFT of the hot spot (item #5). They should touch each other by ONE pixel (this is for cosmetic reasons only).
  133.  
  134.  
  135.  
  136. -- part contents for background part 3
  137. ----- text -----
  138. ShowDialog XCMD Type 4 (continued...)
  139.  
  140. -- part contents for background part 7
  141. ----- text -----
  142. 19
  143.  
  144. -- part contents for card part 4
  145. ----- text -----
  146. When designing your DLOG template keep in mind that the LENGTH of the hot spot will be determined by the longest item in the menu list.  If you suspect that your menu lists may contain long words then leave enough space on your template so that the hot spot won't "run into" any other DITL item.
  147.  
  148. When the dialog is actually displayed, the hot spot will appear as a shadow box containing the currently selected menu item.
  149.  
  150.  
  151.